package com.colin.aiyi.ui.register;

import com.colin.aiyi.ui.IViewAc;
import com.colin.aiyi.dao.ImpxUtils.ImpRegister;
import com.colin.aiyi.dao.ImpxUtils.ImpSenfCode_Register;
import com.colin.aiyi.presenter.AbsP;

/**
 * Created by hl on 2017/6/9.
 */

public class ImpPRegister extends AbsP {


    IViewAc iViewAc;

    @Override
    public <IViewAc> void setIView(IViewAc v) {
        this.iViewAc= (com.colin.aiyi.ui.IViewAc) v;
    }

    @Override
    public <User> void register_sendCode(User user) {
        iService=new ImpSenfCode_Register();
        iService.getObject(user);
    }


    @Override
    public <User> void login_register(User user) {
        iService=new ImpRegister();
        iService.getObject(this,user);
    }


    @Override
    public void onSuccess(Object t) {
        super.onSuccess(t);
        if (iViewAc!=null)
        {
            iViewAc.netResponse(t);
        }
    }
}
